package com.naxiang.zhaohang.naxiangdiloge;

import android.app.Dialog;
import android.widget.Toast;

import com.naxiang.zhaohang.interfacs.BackCall;
import com.naxiang.zhaohang.utils.DialogUtil;
import com.naxiang.zhaohang.utils.MunberUtils;
import com.uzmap.pkg.uzcore.UZWebView;
import com.uzmap.pkg.uzcore.uzmodule.UZModule;
import com.uzmap.pkg.uzcore.uzmodule.UZModuleContext;

/**
 * 作者: 赵航
 * 创建时间: 2018/5/31 18:14
 * 描述:
 */
public class NaXiangDialoge extends UZModule {
    public NaXiangDialoge(UZWebView webView) {
        super(webView);
    }

    //弹出对话框
    public void jsmethod_openStarDailoge(UZModuleContext moduleContext) {
//        Toast.makeText(mContext,"已经可以吊起了",Toast.LENGTH_SHORT).show();

        Dialog dialog = DialogUtil.showInfoDialog(mContext, "提示", "这是提示语", new BackCall() {

            @Override
            public void deal(String which, Object... obj) {

                switch (which) {
                    case MunberUtils.CONFIRM:
                        Toast.makeText(mContext, "点击确认了", Toast.LENGTH_SHORT).show();
                        break;
                }
            }
        });
        dialog.show();

//
        DialogUtil.showInfoDialogTwo(mContext, "提示", "这是提示语", "这里确定", "这里取消", new BackCall(){
            @Override
            public void deal(String which, Object... obj) {
                switch (which) {
                    case MunberUtils.CONFIRM:
                        Toast.makeText(mContext,"点击确认了",Toast.LENGTH_SHORT).show();
                        break;
                    case MunberUtils.CANCEL:
                        Toast.makeText(mContext,"点击取消了",Toast.LENGTH_SHORT).show();
                        break;
                }

            }
        });


    }
    //点击确定
    public void jsmethod_openSureDailoge(UZModuleContext moduleContext) {
//        Toast.makeText(mContext,"已经可以吊起了",Toast.LENGTH_SHORT).show();

    }
    //点击取消
    public void jsmethod_openCansoDailoge(UZModuleContext moduleContext) {
//        Toast.makeText(mContext,"已经可以吊起了",Toast.LENGTH_SHORT).show();

    }
}
